<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>欢迎页面-X-admin2.2</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />

    <link rel="stylesheet" href="{{URL::asset('resources/xadmin/css/font.css')}}">
    <link rel="stylesheet"  href="{{URL::asset('resources/xadmin/css/xadmin.css')}}">

    <script type="text/javascript" src="{{URL::asset('resources/xadmin/lib/layui/layui.js')}}"></script>
    <script type="text/javascript" src="{{URL::asset('resources/xadmin/js/xadmin.js')}}"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">

        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body ">
                    <blockquote class="layui-elem-quote">欢迎管理员：
                        <span class="x-red">{{Auth::guard('admin')->user()->username}}</span><br>
                        <span>您的管理员序号是:{{Auth::guard('admin')->user()->id}}   </span>
                        当前时间:<?php echo date('Y-m-d H:i:s');?>
{{--                        <span class="x-red">{{Auth::guard('admin')->user()}}</span><br>--}}
                    </blockquote>
                </div>
            </div>
        </div>


        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">系统功能</div>
                <div class="layui-card-body ">
                    <ul class="layui-row layui-col-space10 layui-this x-admin-carousel x-admin-backlog">


                        <li class="layui-col-md3 layui-col-xs6">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h3>已实现</h3>
                                <p class="x-admin-backlog-body"><cite>RBAC授权鉴权机制</cite></p>
                            </a>
                        </li>
                        <li class="layui-col-md3 layui-col-xs6">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h3>已实现</h3>
                                <p class="x-admin-backlog-body"><cite>ECHARTS信息可视化</cite></p>
                            </a>
                        </li>
                        <li class="layui-col-md3 layui-col-xs6">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h3>已实现</h3>
                                <p class="x-admin-backlog-body"><cite>邮件信息订阅</cite></p>
                            </a>
                        </li>
                        <li class="layui-col-md3 layui-col-xs6">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h3>待实现</h3>
                                <p class="x-admin-backlog-body"><cite>MQTT远程控制</cite></p>
                            </a>
                        </li>

                    </ul>
                </div>
            </div>
        </div>


        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">当前您所拥有的权限集合</div>
                <div class="layui-card-body ">
                    <ul class="layui-row layui-col-space10 layui-this x-admin-carousel x-admin-backlog">

                        @foreach($auth as $value)
                        @if(in_array($value->id,explode(',',Auth::guard('admin')->user()->Role->auth_ids)))
                        {{--<li class="layui-col-md2 layui-col-xs6">--}}
                            {{--<a href="javascript:;" class="x-admin-backlog-body">--}}
                                {{--<h3>{{$value->pid}}</h3>--}}
                                {{--<p><cite>{{$value->auth_name}}</cite></p>--}}
                            {{--</a>--}}
                        {{--</li>--}}

                         <li class="layui-col-md3 layui-col-xs6">
                             <a href="javascript:;" class="x-admin-backlog-body">
                                <h3>{{$value->pid}}</h3>
                                 <p><cite>{{$value->auth_name}}</cite></p>
                             </a>
                         </li>

                        @endif
                        @endforeach

                    </ul>
                </div>
            </div>
        </div>
        {{-- <div class="layui-col-sm6 layui-col-md3">
            <div class="layui-card">
                <div class="layui-card-header">下载
                    <span class="layui-badge layui-bg-cyan layuiadmin-badge">月</span></div>
                <div class="layui-card-body  ">
                    <p class="layuiadmin-big-font">33,555</p>
                    <p>新下载
                        <span class="layuiadmin-span-color">10%
                                    <i class="layui-inline layui-icon layui-icon-face-smile-b"></i></span>
                    </p>
                </div>
            </div>
        </div> --}}

        <div class="layui-col-md12">
            {{-- <div class="layui-field-box"> --}}

<div style="font-size:13px">系统当前用户认证信息</div><hr>
        <div class="layui-col-sm6 layui-col-md4">
            <div class="layui-card">
                <div class="layui-card-header">
                    <i class="layui-icon  layui-icon-user"style="font-size: 30px; color: #c2c2c2;"></i>
                    管理员数量
                  </div>
                <div class="layui-card-body ">
                <p class="layuiadmin-big-font" style="font-size:30px;color:#393D49">{{$manager_count}}</p>
                </div>
            </div>
        </div>
        <div class="layui-col-sm6 layui-col-md4">
            <div class="layui-card">
                <div class="layui-card-header"><i class="layui-icon  layui-icon-username"style="font-size: 30px; color: #c2c2c2;"></i>
                    角色数量    </div>
                <div class="layui-card-body ">
                    <p class="layuiadmin-big-font"style="font-size:30px;color:#393D49">{{$role_count}}</p>
                </div>
            </div>
        </div>
        <div class="layui-col-sm6 layui-col-md4">
            <div class="layui-card">
                <div class="layui-card-header"><i class="layui-icon  layui-icon-senior"style="font-size: 30px; color: #c2c2c2;"></i>
                    权限数量 </div>
                <div class="layui-card-body ">
                    <p class="layuiadmin-big-font"style="font-size:30px;color:#393D49">{{$auth_count}}</p>
                </div>
            </div>
        </div>
</div>




        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">系统信息</div>
                <div class="layui-card-body ">
                    <table class="layui-table">


                        <tbody>
                            <th>服务器域名/IP地址</th>
                            <td>http://39.106.160.132</td></tr>
                        <tr>
                            <th>服务器操作系统</th>
                            <td><?php $os = explode(" ", php_uname()); echo $os[0];?> &nbsp;内核版本：<?php if('/'==DIRECTORY_SEPARATOR){echo $os[2];}else{echo $os[1];} ?></td></tr>
                        {{-- <tr>
                            <th>服务器负载</th>
                            <td></td></tr> --}}
                        <tr>
                            <th>运行环境</th>
                            <td><?php echo $_SERVER['SERVER_SOFTWARE'];?></td></tr>
                        <tr>
                            <th>PHP版本</th>
                            <td><?php echo PHP_VERSION;?></td></tr>
                        <tr>
                            <th>PHP运行方式</th>
                            <td><?php echo strtoupper(php_sapi_name());?></td></tr>


                            <th>MYSQL版本</th>
                            <td>10.1.44-MariaDB</td></tr>
                        <tr>
                            <th>服务器端口</th>
                            <td>80</td></tr>
                        <tr>
                            <th>脚本超时时间</th>
                            <td>30S</td></tr>
                        </tbody>
                    </table>


                </div>
            </div>
        </div>
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">开发团队</div>

                <div class="layui-card-body ">
                    <table class="layui-table">
                        <tbody>

                        <tr>
                            <th>前端+后端</th>
                            <td><strong>计科1804陈永琦</strong></td>
                        </tr>
                        <tr>
                            <th>后端</th>
                            <td><strong>计科1804贾立鑫</strong></td>
                        </tr>
                        <tr>
                            <th>前端</th>
                            <td><strong>计科1805胡会珍</strong></td>
                        </tr>
                        </tbody>
                    </table>
                </div>

            </div>
        </div>
        <style id="welcome_style"></style>
        <div class="layui-col-md12">
            <blockquote class="layui-elem-quote layui-quote-nm">Thanks for your visit!</blockquote></div>
    </div> 
</div>
</div>
</body>
</html>
